package common.commands;

import java.io.FileInputStream;

import common.Relations;

import math.Relation;
import ui.WindowManager;
import ui.cli.console.Terminal;
import ui.gui.documents.AbstractDocument;
import ui.gui.documents.toolbox.Workspace;

public class CommandLoadWorkspace implements ICommand {

	@Override
	public String getName() {
		
		return "load-workspace";
	}

	@Override
	public String getSynopsis() {
		
		return "load-workspace";
	}

	@Override
	public CommandValue run(String arg) {
		FileInputStream fis = null;
		try
		{
		fis = new FileInputStream(arg);
		Terminal.Launch(fis);
		}
		catch (Exception ex) {
			System.out.println("Unable to open file ["+arg+"]");
		}
		
		return CommandValue.OK;
	}

	@Override
	public String help() {
		
		return "This command load CLAC workspace from a file";
	}

}
